<?php
// no direct access
defined('_JEXEC') or die;
$this->item->text=preg_replace("#</?(tr|table|tbody)[^>]*>#","",$this->item->text);
preg_match_all("|<td[^>]*>\s*([\s\S]+?)\s*</td>|u",$this->item->text,$blocks);
$blocks=$blocks[1];

function wrapTxt($a, $b=''){
	
	echo '<div class="col-box ',$b,'">
			',$a,'
		</div>';
}

require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
if ( $detect->isMobile() ) {
    include('hiw_mobile.php');
    return;
}

?>
<div class="wrapper">
	<div class="content" id="how-page">
		<h1 class="hd"><?php echo $this->escape($this->item->title)?></h1>
		<div class="col-wrapper clearfix">
			<div class="col-2 col-cfg">
<?php
		if($blocks[0])
			wrapTxt($blocks[0]);
		if($blocks[2])
			wrapTxt($blocks[2]);
		if($blocks[4])
			wrapTxt($blocks[4]);
		if($blocks[6])
			wrapTxt($blocks[6], "clearfix");
		if($blocks[8])
			wrapTxt($blocks[8], "clearfix");
		if($blocks[9])
			wrapTxt($blocks[9], "clearfix");
?>
			</div>
			<div class="col-2 col-cfg col-last">
				<?php echo preg_replace("#\{youtube .*?=(.+)\}#",'<iframe width="470" height="265" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>',$blocks[1])?>
<?php
		if($blocks[3])
			wrapTxt($blocks[3]);
		if($blocks[5])
			wrapTxt($blocks[5]);
		if($blocks[7])
			wrapTxt($blocks[7]);
?>
			</div>
		</div>
	</div>
</div>
<!--hiw-->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 982967144;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>

<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/982967144/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<?php
return;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params		= $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit	= $this->item->params->get('access-edit');
$user		= JFactory::getUser();